home *** CD-ROM | disk | FTP | other *** search
- /*
- ** $VER: Pixload 2.2
- ** www.Pixel-Art.fr.st
- */
-
- call init
- call CreateApp(f)
- call HandleApp
-
- /*never reached */
- /*************************************/
- init: procedure expose global. version
- l="rmh.library";if ~show("L",l) then;if ~addlib(l,0,-30) then exit
- if AddLibrary("rxmui.library")~=0 then exit
-
- if ~show('L',"rexxtricks.library") then do
- call addlib('rexxtricks.library',0,-30,0)
- end
- address command "Version >RAM:t/Version sys:libs/rxmui.library"
- open(file,'RAM:t/Version', 'r' )
- version=readln(file)
- close(file)
- address command 'delete >nil: ram:t/version'
- version=word(version,2)
- call rxmuiopt("debugmode showerr")
- return
- /**********************************************************************************************/
- HandleApp: procedure expose programme. echantillon. volume son aide. visualiseur lecteur joueur
- ctrl_c=2**12
- do forever
- call NewHandle("app","h",ctrl_c)
- if and(h.signals,ctrl_c)>0 then exit
- select
- when h.event="QUIT" then exit
- when h.event="APPEVENT" then call appFun(h.to,h.name)
- otherwise interpret h.event
- end
- end
- /* never reached */
- /******************************************************************************************************/
- CreateApp: procedure expose programme. echantillon. son volume aide. version visualiseur lecteur joueur
-
- fenetre_info.Class="Win"
- fenetre_info.dragbar=0
- fenetre_info.borderless=1
- fenetre_info.closegadget=0
- fenetre_info.depthgadget=0
- fenetre_info.sizegadget=0
- fenetre_info.topedge=-1
- fenetre_info.leftedge=-1
-
- fenetre_info.Contents="info_group"
-
- info_group.0="info_contenu"
-
- info_contenu.Class="text"
- info_contenu.Font="Big"
- info_contenu.Contents=ParseText("%3%c Pixload version 2.2 ")
-
- info_group.1=hbar()
- info_group.2=vspace(2)
-
- info_group.3="info_contenu_1"
- info_contenu_1.Class="text"
- info_contenu_1.Font="big"
- info_contenu_1.Contents=""
-
- if NewObj("window","fenetre_info")>0 then exit
-
- /***********************************************/
-
- open(chemin,"Pixload:Prefs/Pixload.prefs",'Read')
-
- icones=readln(chemin)-1
-
- orientation=readln(chemin)
- if orientation=1 then orientation=icones+1
-
- son=readln(chemin)
- volume=readln(chemin)
- taille=readln(chemin)
- visualiseur=readln(chemin)
- lecteur=readln(chemin)
- joueur=readln(chemin)
-
- do num=0 to 14
-
- actif=readln(chemin)
- programme.num="address command 'wbrun >nil: "||readln(chemin)||"'"
-
- aide.num=readln(chemin)
- if aide.num="" then aide.num="???"
-
- echantillon.num=readln(chemin)
- if echantillon.num="" then echantillon.num="pixload:sons/bip"
-
- end
-
- call close(chemin)
-
- /********************************************/
-
- app.Title="Pixload"
- app.Version="$VER: Pixload version 2.2"
- app.Author="Pixel Art - www.Pixel-Art.fr.st"
- app.Description="Programs loading bar"
- app.SubWindow="win"
- app.Base="Pixload"
-
- win.Class="BWin"
- win.nosize=1
-
- win.ID="MAIN"
- win.AppWindow=1
- win.Contents="barre_group"
-
- barre_group.0="sous_group"
-
- sous_group.class="Group"
- sous_group.columns=orientation
-
- do i=0 to icones
-
- sous_group.i="icone_iff."i
- icone_iff.i.class="gfxpic"
- icone_iff.i.shorthelp=aide.i
- icone_iff.i.source="Pixload:icones/"i
- icone_iff.i.transparent=1
- icone_iff.i.scale=taille
- icone_iff.i.precision="image"
- icone_iff.i.draw=1
- icone_iff.i.inputmode="relverify"
- end
-
- if NewObj("application","app")>0 then exit
-
- call add("app","fenetre_info")
- call set("fenetre_info","open",1)
-
- if c2d(version)<842542640 then do /* version 28.0 ou plus exigée */
- call set("info_contenu","contents",parsetext("%3%cPixload needs RXMui 28.0 or more"))
- call set("info_contenu_1","contents",parsetext("%3%c(detected version "version")"))
- address command 'sys:c/wait 5'
- exit
- end
-
- if son=1 then
- call set("info_contenu_1","contents",parsetext("%3%cSound enabled"))
- else
- call set("info_contenu_1","contents",parsetext("%3%cSound disabled"))
-
- address command 'sys:c/wait 2'
-
- call domethod("win","adduseritem","Pixload's Prefs",1)
- call domethod("win","adduseritem","Sound - On/Off",2)
-
- call notify("win","useritem",1,"app","return","call prefs")
- call notify("win","useritem",2,"app","return","call son")
-
- do i=0 to icones
- call Notify("icone_iff."i,"pressed",1,"app","Return","call dofun("i")")
- end
-
- call Notify("win","CloseRequest",1,"app","ReturnID","quit")
-
- do i=0 to icones
- call AppMessage("icone_iff."i)
- end
-
- call set("win","open",1)
-
- if son=1 then do
- addlib('rexxsupport.library',0,-30,0)
- address command 'run sys:c/gcsound'
- address 'gcsound'
- sound "pixload:Sons/diag" 1 volume/1.5625
- end
-
- call set("info_contenu_1","contents",parsetext("%3%cDiagnostic complete"))
-
- if son=1 then address command 'sys:c/wait 3'
- else address command 'sys:c/wait 1'
- call set("fenetre_info","open",0)
-
- return
- /***************/
- prefs: procedure
-
- call set("fenetre_info","open",1)
- call set("info_contenu_1","contents",Parsetext("%3%cPixload Prefs 2.2"))
-
- address command 'wbrun sys:prefs/pixload-prefs'
- address command 'sys:c/wait 1'
- call set("fenetre_info","open",0)
-
- return
- /********************************/
- son: procedure expose son volume
-
- if son=1 then do
- son=0
- call set("info_contenu_1","contents",parsetext("%3%cSound disabled"))
- end
- else do
- son=1
- call set("info_contenu_1","contents",parsetext("%3%cSound enabled"))
- addlib('rexxsupport.library',0,-30,0)
- address command 'run sys:c/gcsound'
- address 'gcsound'
- sound "pixload:Sons/1" 1 volume/1.5625
- end
-
- call set("fenetre_info","open",1)
- address command 'sys:c/wait 1'
- call set("fenetre_info","open",0)
-
- return
- /****************************************************************/
- dofun: procedure expose programme. echantillon. son aide. volume
-
- parse arg a
-
- if son=1 then
-
- do
- address 'gcsound'
- sound echantillon.a 1 volume/1.5625
- end
-
- call set("fenetre_info","open",1)
- call set("info_contenu_1","contents",Parsetext("%3%c"aide.a))
- address command 'sys:c/wait 1'
- call set("fenetre_info","open",0)
-
- cmd=programme.a
- interpret cmd
-
- return
- /****/
- halt:
- break=_c:
- exit
- /******************************************************************/
- appFun: procedure expose programme. visualiseur lecteur joueur aide.
-
- parse arg to,what
-
- filet=whatis(what)
-
- if filet="Volume" then do
- call set("fenetre_info","open",1)
- call set("info_contenu_1","contents",Parsetext("%3%cEjection "what))
- address command 'sys:c/eject "'||what||'"'
- address command 'wait 1'
- call set("fenetre_info","open",0)
- end
-
- else do
- numero=right(to,length(to)-10)
- if (numero=0 | numero=1 | numero=2) then do
- call set("fenetre_info","open",1)
- call set("info_contenu_1","contents",Parsetext("%3%c%b"aide.numero))
- address command 'sys:c/wait 1'
- call set("fenetre_info","open",0)
- what=insert('"',insert('"',what,length(what)))
- cmd=left(programme.numero,length(programme.numero)-1) what"'"
- interpret cmd
- end
- else do
- select
- when filet="GIF" then extension=visualiseur
- when filet="JPEG" then extension=visualiseur
- when filet="PNG" then extension=visualiseur
- when filet="PSD" then extension=visualiseur
- when filet="8SVX" then extension="sys:c/dsound -2 -f"
- when filet="IFF" then extension=visualiseur
- when filet="ILBM" then extension=visualiseur
- when filet="ILBM24" then extension=visualiseur
- when filet="Rexx" then extension=lecteur
- when filet="Text" then extension=lecteur
- when filet="Mod" then extension=joueur
- when filet="Module" then extension=joueur
- when filet="Modules" then extension=joueur
- when filet="MP3" then extension="rxs sys:s/start-amplifier"
- when filet="Unknown" then filet="non reconnu"
- otherwise extension="sys:utilities/multiview"
- end
- call set("fenetre_info","open",1)
- call set("info_contenu_1","contents",Parsetext("%3%ctype : "filet))
- address command 'sys:c/wait 1'
- call set("fenetre_info","open",0)
- if filet~=="non reconnu" then address command 'run '||extension '"'||what||'"'
- end
- end
- return
-
-